package com.fy.sys.controller;

import com.fy.core.vo.ApiRest;
import com.fy.sys.entity.Menu;
import com.fy.sys.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 菜单权限表 前端控制器
 * </p>
 *
 * @author hxd
 * @since 2023-06-14
 */
@RestController
@CrossOrigin
@RequestMapping("/menu")
public class MenuController {
    @Autowired
    private MenuService menuService;
    @GetMapping("tree")
    public ApiRest getMenuList(){
        ApiRest menuTree = menuService.findMenuTree();
        return menuTree;
    }
}
